read and print settings

## settings:
## 
## bastoolsDir :  chr "/home/bastian.egeter/git_bastools/bastools/"
## facetcol :  chr "Description"
## filter_dxn :  num 10
## filter_dxn2 :  num 0
## hidelegend :  logi TRUE
## neg.groups :  chr "Sample_Plate"
## neg.types :  chr "PCR_negative"
## plotting.vars :  chr [1:5] "ss_sample_id" "Sample_Name" "biomaterial" "Replicate_Name" ...
## problemTaxa :  chr [1:2] "Eukaryota;Arthropoda;Arachnida;Scorpiones;" ...
## real :  chr "GIT_contents"
## remove.entire.dataset :  logi TRUE
## rep.rm :  chr "biomaterial"
## rep.rm.first :  logi FALSE
## rep.rm.second :  logi FALSE
## samplepc :  num 0.05
## subsetlist : List of 1
##  $ experiment_id: chr "2020_02"
## sumrepsby :  chr "ss_sample_id"
## taxa.to.group :  NULL
## taxatabs :  chr "/mnt/Disk1/BASTIAN_POST_MBC_MISEQS/2020_02/FWH/SCORPION-none.flash2.vsearch_qfilt.cutadapt.vsearch_uniq.no_afil"| __truncated__
## taxonpc :  num 0.05
## unwantedTaxa :  chr "NothingToAdd"
## url :  chr "https://docs.google.com/spreadsheets/d/1VaMRnezBhMCul8Xk-yGAxYZ9tV7inn1QoT5doOLns4s/edit#gid=775886566"
## use.contamination.filter :  logi TRUE
## xLevel :  NULL
## Registered S3 methods overwritten by 'ggplot2':
##   method         from 
##   [.quosures     rlang
##   c.quosures     rlang
##   print.quosures rlang
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union

organise mastersheet

## Using an auto-discovered, cached token.
## To suppress this message, modify your code or options to clearly consent to the use of a cached token.
## See gargle's "Non-interactive auth" vignette for more details:
## https://gargle.r-lib.org/articles/non-interactive-auth.html
## The googlesheets4 package is using a cached token for basegeter@gmail.com.
## Reading from 'SCORPION_Project_datasheet'
## Range "'Master_Samplesheet'"
## New names:
## * library_name -> library_name...6
## * Sample_Type -> Sample_Type...31
## * Sample_Type -> Sample_Type...32
## * library_name -> library_name...35
## Removing duplicated columns
## Checks only include the mostly used headers, please check to see all desired headers exist
## Subsetting datasheet
## $experiment_id
## [1] "2020_02"
##               experiment_id
## sample_type    2020_02
##   GIT_contents      37
##   PCR_negative       1

import taxatabs

## Loading required package: tidyverse
## ── Attaching packages ────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ tibble  2.1.3     ✔ purrr   0.3.2
## ✔ tidyr   0.8.3     ✔ stringr 1.4.0
## ✔ readr   1.3.1     ✔ forcats 0.4.0
## ── Conflicts ───────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## /mnt/Disk1/BASTIAN_POST_MBC_MISEQS/2020_02/FWH/SCORPION-none.flash2.vsearch_qfilt.cutadapt.vsearch_uniq.no_afilt.allsamples_step5.ALL_vsearch_uniq.nodenoise.noclust.taxatable.tf.spliced.txt
## reads: 912488, taxa: 47, samples: 38
## Read counts all good
## merged taxatable
## reads: 912488, taxa: 47, samples: 38

remove problem taxa - usually human, predator, NAs and no_hits

## Removing no_hits
## Removing NAs - sequences that had blast hits but were not assigned to any taxon
## Removing problem taxa
## Removing taxa:
## [1] "Eukaryota;Arthropoda;Arachnida;Scorpiones;Bothriuridae;Brachistosternus;NA"               
## [2] "Eukaryota;Arthropoda;Arachnida;Scorpiones;NA;NA;NA"                                       
## [3] "Eukaryota;Arthropoda;Arachnida;Scorpiones;Scorpionidae;Heterometrus;Heterometrus laoticus"
## [4] "Eukaryota;Arthropoda;Arachnida;Scorpiones;Scorpionidae;Heterometrus;NA"                   
## [5] "Eukaryota;Arthropoda;Arachnida;Scorpiones;Scorpionidae;NA;NA"
## Removing taxa:
## [1] "Eukaryota;unknown;unknown;unknown;NA;NA;NA"
## Checking negs
## Ignoring the following taxa: NA;NA;NA;NA;NA;NA;NA & no_hits;no_hits;no_hits;no_hits;no_hits;no_hits;no_hits
## No negatives found with reads
## No negatives with reads, skipping negatives report

apply taxon and sample filters

## Applying taxon_pc filter.
## Using filter of 0.05 %. reads removed: 0 from 20072 ; detections removed: 0 from 108
## Applying sample_pc filter. Note: this removes samples with no reads
## Using filter of 0.05 %. reads removed: 2 from 20072 ; detections removed: 1 from 108
## Checking negs
## Ignoring the following taxa: NA;NA;NA;NA;NA;NA;NA & no_hits;no_hits;no_hits;no_hits;no_hits;no_hits;no_hits
## No negatives found with reads
## No negatives with reads, skipping negatives report

remove detection in less than 2 reps (only done here if rep.rm.first is TRUE)

PCR negatives are exempt, if the negative option is set (only makes sense pre-rm.contaminants function, or without rm.contaminants function)

apply detection filter

## Applying detection filter
## Using detection filter of 10 : reads removed: 171 from 20070 ; detections removed: 39 from 107
## Checking negs
## Ignoring the following taxa: NA;NA;NA;NA;NA;NA;NA & no_hits;no_hits;no_hits;no_hits;no_hits;no_hits;no_hits
## No negatives found with reads
## No negatives with reads, skipping negatives report

remove contaminants from relevant groups

## No negatives with reads, skipping contaminant filter

remove detection in less than 2 reps

PCR negatives are exempt, if the negative option is set (only makes sense pre-rm.contaminants function, or without rm.contaminants function)

sum reps

## If only one rep, will keep that rep

apply 2nd detection filter (possibly makes more sense here?)

## Applying detection filter
## Using detection filter of 0 : reads removed: 0 from 19899 ; detections removed: 0 from 68

aggregate at chosen level and keep only that-level taxa

## Skipping aggregate of taxa at xLevel

remove unwanted taxa for analysis

## Removing unwanted taxa

summary —this is pre-grouping

## Skipping grouping of taxa

group taxa, where possible

if(is.null(taxa.to.group)){
  message("Skipping grouping of taxa")
} else {
  
  for(i in 1:nrow(taxa.to.group)){
    all.taxatabs.ss<-bas.group.taxa(taxatab = all.taxatabs.ss,taxon=as.character(taxa.to.group[i,1]), jointo=as.character(taxa.to.group[i,2]))
  }
  
  stepcounter<-stepcounter+1
  all.stats[[stepcounter]]<-taxatab.sumStats(all.taxatabs.ss,stepname = "group_taxa")
}
## Skipping grouping of taxa

summary–post-grouping

## Skipping grouping of taxa

some barplots

## Making barplots
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend

## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend

## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend

## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend

## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend

## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend
## If column names are not ss_sample_ids using 'grouping' to specify what they are
## Using taxon as id variables
## Note: think about which plots make sense. If sumrepsby is biomaterial, then plots using e.g. extraction method
##             do not make sense, because there is more than one possibility for each biomaterial
## Outputting as a list where first element is plot and second is legend

pca plot

## Plotting pca plot with lines
## Assuming grouping has already been done
## Principal Component Analysis plot of community simmilarity using Bray-Curtis distances
## Note: Ellipses will not be calculated if there are groups with too few data points
## ellipses are drawn with a confidence level of 0.90
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Assuming grouping has already been done
## Principal Component Analysis plot of community simmilarity using Bray-Curtis distances
## Note: Ellipses will not be calculated if there are groups with too few data points
## ellipses are drawn with a confidence level of 0.90

## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Assuming grouping has already been done
## Principal Component Analysis plot of community simmilarity using Bray-Curtis distances
## Note: Ellipses will not be calculated if there are groups with too few data points
## ellipses are drawn with a confidence level of 0.90

## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Assuming grouping has already been done
## Principal Component Analysis plot of community simmilarity using Bray-Curtis distances
## Note: Ellipses will not be calculated if there are groups with too few data points
## ellipses are drawn with a confidence level of 0.90

## Assuming grouping has already been done
## Principal Component Analysis plot of community simmilarity using Bray-Curtis distances
## Note: Ellipses will not be calculated if there are groups with too few data points
## ellipses are drawn with a confidence level of 0.90

## Plotting pca plot without lines
## Assuming grouping has already been done
## Principal Component Analysis plot of community simmilarity using Bray-Curtis distances
## Note: Ellipses will not be calculated if there are groups with too few data points
## ellipses are drawn with a confidence level of 0.90
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Assuming grouping has already been done
## Principal Component Analysis plot of community simmilarity using Bray-Curtis distances
## Note: Ellipses will not be calculated if there are groups with too few data points
## ellipses are drawn with a confidence level of 0.90

## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Assuming grouping has already been done
## Principal Component Analysis plot of community simmilarity using Bray-Curtis distances
## Note: Ellipses will not be calculated if there are groups with too few data points
## ellipses are drawn with a confidence level of 0.90

## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Assuming grouping has already been done
## Principal Component Analysis plot of community simmilarity using Bray-Curtis distances
## Note: Ellipses will not be calculated if there are groups with too few data points
## ellipses are drawn with a confidence level of 0.90

## Assuming grouping has already been done
## Principal Component Analysis plot of community simmilarity using Bray-Curtis distances
## Note: Ellipses will not be calculated if there are groups with too few data points
## ellipses are drawn with a confidence level of 0.90

combine counts and taxalists

## Note that detections/samples after sumreps will be fewer because reps are joined
##    detections  reads taxa samples                step
## 1         202 912488   47      34               start
## 2         192 911935   46      34           rm.nohits
## 3         184 911090   45      34     rm.non-assigned
## 4         108  20072   39      34          rm.problem
## 5         108  20072   39      30             taxonpc
## 6         107  20070   39      30            samplepc
## 7          68  19899   27      23           dxnfilter
## 8          68  19899   27      23             sumreps
## 9          68  19899   27      23          dxnfilter2
## 10         68  19899   27      23 aggregate_by_xLevel
## 11         68  19899   27      23            unwanted
## The taxalist output needs more work, depends on collapsed taxa, need to split nto 2 tables, pre and post collapse.
##         Running pre-aggregate_by_xLevel only. Some clever way to plot this?

final taxa list

##  [1] Eukaryota;Arthropoda;Arachnida;Araneae;Linyphiidae;NA;NA                           
##  [2] Eukaryota;Arthropoda;Arachnida;Araneae;NA;NA;NA                                    
##  [3] Eukaryota;Arthropoda;Arachnida;unknown;NA;NA;NA                                    
##  [4] Eukaryota;Arthropoda;Collembola;Entomobryomorpha;NA;NA;NA                          
##  [5] Eukaryota;Arthropoda;Insecta;Blattodea;Blaberidae;Blaptica;Blaptica dubia          
##  [6] Eukaryota;Arthropoda;Insecta;Blattodea;Blaberidae;NA;NA                            
##  [7] Eukaryota;Arthropoda;Insecta;Blattodea;NA;NA;NA                                    
##  [8] Eukaryota;Arthropoda;Insecta;Coleoptera;NA;NA;NA                                   
##  [9] Eukaryota;Arthropoda;Insecta;Coleoptera;Tenebrionidae;Tenebrio;Tenebrio molitor    
## [10] Eukaryota;Arthropoda;Insecta;Diptera;Culicidae;Culex;Culex bahamensis              
## [11] Eukaryota;Arthropoda;Insecta;Diptera;NA;NA;NA                                      
## [12] Eukaryota;Arthropoda;Insecta;Hemiptera;Aphididae;NA;NA                             
## [13] Eukaryota;Arthropoda;Insecta;Hemiptera;NA;NA;NA                                    
## [14] Eukaryota;Arthropoda;Insecta;Lepidoptera;NA;NA;NA                                  
## [15] Eukaryota;Arthropoda;Insecta;Lepidoptera;Noctuidae;Lacanobia;Lacanobia oleracea    
## [16] Eukaryota;Arthropoda;Insecta;Lepidoptera;Tortricidae;NA;NA                         
## [17] Eukaryota;Arthropoda;Insecta;Orthoptera;Gryllidae;Gryllus;NA                       
## [18] Eukaryota;Arthropoda;Insecta;Orthoptera;Gryllidae;NA;NA                            
## [19] Eukaryota;Arthropoda;Protura;unknown;Fujientomidae;Fujientomon;Fujientomon dicestum
## [20] Eukaryota;Arthropoda;unknown;unknown;NA;NA;NA                                      
## [21] Eukaryota;Chordata;Mammalia;Carnivora;Canidae;Canis;Canis lupus                    
## [22] Eukaryota;Chordata;Mammalia;Lagomorpha;Leporidae;Oryctolagus;Oryctolagus cuniculus 
## [23] Eukaryota;Chordata;Mammalia;Primates;Hominidae;Homo;Homo sapiens                   
## [24] Eukaryota;Chordata;unknown;Squamata;Lacertidae;Podarcis;NA                         
## [25] Eukaryota;Mollusca;Bivalvia;Veneroida;Dreissenidae;Dreissena;Dreissena polymorpha  
## [26] Eukaryota;Mollusca;Gastropoda;Stylommatophora;NA;NA;NA                             
## [27] Eukaryota;Nematoda;Chromadorea;Rhabditida;NA;NA;NA                                 
## 47 Levels: Eukaryota;Arthropoda;Arachnida;Araneae;Dictynidae;Cicurina;NA ...

plot counts

## Note that detections/samples after sumreps will be fewer because reps are joined

a few final sentences would be good

write final table